#ifndef HANDLER_H
#define HANDLER_H

#include "event_handler.h"

namespace network {
	class handler : public network::event_handler {
	public:
		handler(boost::shared_ptr<network::i_socket> s)
		:_sock(s){}
		virtual ~handler() {}

		virtual network::event_type get_type() const 
		{
			return network::RECEIVE;
		}
		virtual boost::shared_ptr<const network::i_socket>
			get_socket() const {return _sock;}
		virtual void handle_event(boost::shared_ptr<network::event> n);
	private:
		boost::shared_ptr<i_socket> _sock;
	};
}

#endif
